import Mock from 'mockjs'
import mainhomeApi from './mock_data/mainhome'
import userhomeApi from './mock_data/userhome'

//mock拦截MainHome组件的数据，并且返回数据
Mock.mock('/home/getMainHomeTableData', mainhomeApi.getMainHomeTableData())
Mock.mock('/home/getMainHomeCountData', mainhomeApi.getMainHomeCountData())
Mock.mock('/home/getMainHomeEchartData', mainhomeApi.getMainHomeEchartData())


//mock拦截UserHome组件的数据，并且返回数据
Mock.mock(/user\/getUser/, 'get', userhomeApi.getUserList)
Mock.mock(/user\/add/, 'post', userhomeApi.createUser)
Mock.mock(/user\/edit/, 'post', userhomeApi.updateUser)
Mock.mock(/user\/delete/, 'post', userhomeApi.deleteUser)
